<#assign StringUtils = beansWrapperFn.getStaticModels()["org.apache.commons.lang3.StringUtils"]>
SELECT T.*
FROM C1_DICTIONARY T
WHERE 1 = 1
<#if StringUtils.isNotBlank(typeCode)>
and (instr(','||t.type_code||',', ','||:typeCode||',') > 0 or instr(','||t.type_name||',', ','||:typeCode||',') > 0)
</#if>
<#if StringUtils.isNotBlank(typeId)>
and T.TYPE_ID = :typeId
</#if>
<#if StringUtils.isNotBlank(code)>
and (instr(','||T.code||',', ','||:code||',') > 0 or instr(','||T.name||',', ','||:code||',') > 0)
</#if>
order by t.ORDER_NUM, t.CODE
LIMIT <#if (begin_row_num??)>:begin_row_num<#else>0</#if>, <#if (size??)>:size<#else>20</#if>
